package cn.dyhack.bibiscan.util;

public class StringUtils {

    private String str = "abcdefghijklmnopqrstuvwxyz";

    public String getRandomString(int length) {
        StringBuffer sb = new StringBuffer();
        int len = str.length();
        for (int i = 0; i < length; i++) {
            sb.append(str.charAt(getRandom(len - 1)));
        }
        return sb.toString();
    }

    private  int getRandom(int count) {
        return (int) Math.round(Math.random()*count);
    }
}
